package com.sen.rbac.enums;


import com.sen.common.common.inter.RespCodeEnum;

/**
 * @author esjiang
 */
public enum  RbacMsgEnum implements RespCodeEnum {

    ACCOUNT_PASSWORD_ERROR(601,"密码不正确",Boolean.FALSE),
    ACCOUNT_NOT_EXIST(600,"账户不存在",Boolean.FALSE),
    ACCOUNT_UPDATE_FAILED(602,"账户更新失败",Boolean.FALSE),
    ACCOUNT_ADD_FAILED(603,"账户新增失败",Boolean.FALSE),
    ACCOUNT_DEL_FAILED(604,"账户删除失败",Boolean.FALSE),
    ACCOUNT_DUPLICATE_ERROR(605,"账户已存在",Boolean.FALSE),
    ACCOUNT_RESET_FAILED(606,"密码重置失败",Boolean.FALSE),
    ID_NULL(607,"主键不能为空",Boolean.FALSE),
    NOT_SUPPORT_OPERATION(608,"不支持的操作",Boolean.FALSE),
    ACCOUNT_ENABLE_FAILED(609,"账户停用启用失败",Boolean.FALSE),
    RECORD_EMPTY(610,"记录为空",Boolean.FALSE),
    RESOURCE_CRUD_FAILED(611,"资源操作失败",Boolean.FALSE),
    RESOURCE_EXIST_CHILDREN(612,"资源存在子节点，请先操作子节点",Boolean.FALSE),
    ACCOUNT_DATA_EXCEPTION(613,"数据异常，存在重复数据",Boolean.FALSE),
    resource_not_exist(614,"资源不存在",Boolean.FALSE),
    resource_data_exception(615,"资源数据异常",Boolean.FALSE),
    role_not_exist(616,"角色不存在",Boolean.FALSE),
    role_data_exception(617,"角色数据异常",Boolean.FALSE),
    role_exist_account(618,"角色存在关联账户",Boolean.FALSE),
    role_crud_failed(619,"角色crud操作失败",Boolean.FALSE),
    role_related_resource_failed(620,"角色关联资源失败",Boolean.FALSE),
    account_related_role_failed(621,"账户关联角色失败",Boolean.FALSE),
    update_password_failed(622,"修改密码失败",Boolean.FALSE),
    account_disabled(623,"账户已被禁用",Boolean.FALSE),
    account_locked(624,"账户已被锁定",Boolean.FALSE),
    account_is_blank(625,"账户名不能为空",Boolean.FALSE),
    tenant_not_exist(626,"区划不存在",Boolean.FALSE),
    object_exist(627,"数据已存在",Boolean.FALSE),
    not_allow_login(628,"没有权限登录平台",Boolean.FALSE),
    ;

    private int code;
    private String message;
    private Boolean success;

    RbacMsgEnum(int value, String text, Boolean success) {
        this.code = value;
        this.message = text;
        this.success = success;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return message;
    }

    @Override
    public boolean isSuccess() { return success;}


}
